package example

import java.io.{File, PrintWriter}
import scala.io.Source

object TestFile {
  def main(args: Array[String]): Unit = {
    Source.fromFile("dat.txt").foreach(print)

    val writer = new PrintWriter(new File("dat.txt"))
    writer.write("hello world\n")
    writer.write("hello scala\n")
    writer.close()


  }
}
